package com.wudl.govern.service.impl;

import com.wudl.govern.domain.MetaProcedure;
import com.wudl.govern.mapper.MetaProcedureMapp;
import com.wudl.govern.service.MetaProcedureService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 函数，存储过程表 Service
 *
 * @author wudl
 */
@Service
public class MetaProcedureServiceImpl implements MetaProcedureService {

    @Autowired
    private MetaProcedureMapp metaProcedureMapp;

    /**
     * 分页查询
     */
    @Override
    public  List<MetaProcedure> page(Integer page, Integer size) {
        PageHelper.startPage(page, size);
        return  metaProcedureMapp.selectList();
    }

    /**
     * 获取
     */
    @Override
    public MetaProcedure getById(Object id) {
        return metaProcedureMapp.selectById(id);
    }

    /**
     * 保存
     */
    @Override
    public void save(MetaProcedure metaProcedure) {
        metaProcedureMapp.insert(metaProcedure);
    }

    /**
     * 更新
     */
    @Override
    public void updateById(MetaProcedure metaProcedure) {
        metaProcedureMapp.updateById(metaProcedure);
    }

    /**
     * 删除
     */
    @Override
    public void removeById(Object id) {
        metaProcedureMapp.deleteById(id);
    }

}